﻿<?php
require_once("_config-rating.php");
if (!$con)
{
	die('Could not connect: ' . mysql_error());
}

mysql_query("SET NAMES 'utf8'");
$pageInclude = 8;

$start_from = 0 ;

$sql = "SELECT * FROM games g order by playTime desc LIMIT $start_from, $pageInclude"; 
$rs_result = mysql_query ($sql,$con); 

while ($row = mysql_fetch_array($rs_result)) { 

$outputMostPlayed =$outputMostPlayed. '<div class="fbx"> <img hspace="10px" style="margin-bottom:3px;margin-left:20px;" align="center" src="'.$row["picUrl"].'" width="50" height="50"/>';
$outputMostPlayed=$outputMostPlayed.'<span class="fbx-tiny">'.$row["gameName"].'</span>';
$outputMostPlayed=$outputMostPlayed.'<span class="fbx-tiny"><a href="play.php?gameid='.$row["gameId"].'&game='.$row["gameName"].'&user_pic='.$pic.'&userid='.$userid.'">Hemen Oyna</a></span></div>';
}

echo $outputMostPlayed;
mysql_close();

?>  
